<?php 
$this->headTitle($this->translator->translator('install_step6_page_title'));
?>

<script language="javascript" type="text/javascript"> 
	$(document).ready(function(){		
		$('#prev').click(function(){
			document.location.href = "<?php echo $this->serverUrl().$this->baseUrl().'/install.php/step3'; ?>";
		});
		$('#cancel').click(function(){
			document.location.href = "<?php echo $this->serverUrl().$this->baseUrl().'/install.php'; ?>";
		});	
		$('#refresh').click(function(){
			document.location.href = "<?php echo $this->serverUrl().$this->baseUrl().'/install.php/step4'; ?>";
		});	
		$('#gotoFrontend').click(function(){
			document.location.href = "<?php echo $this->serverUrl().$this->baseUrl(); ?>";
		});
		$('#gotoBackend').click(function(){
			document.location.href = "<?php echo $this->serverUrl().$this->baseUrl().'/Administrator'; ?>";
		});	
	});
	<!--
	function setButtonState(button, state) {		
		var b = $('#'+button);
		if(b) 
		{				
			if(state)
			{
				b.removeClass('button');			
				b.addClass('buttonDisabled');
				b.attr('disabled','disabled');
			}
			else
			{
				b.removeClass('buttonDisabled');			
				b.addClass('button');
				b.removeAttr('disabled');
			}	
		}
	}
	
	function setFocus(id) {
		$('#'+id).focus();
	}	
	//-->
	</script>
    
    <form id="step4frm" name="step4frm" method="post" action="<?php echo $this->baseUrl().'/install.php/step6'; ?>">
        <fieldset>
            <legend><?php echo $this->translator->translator('install_step_6_of_6'); ?></legend>
            
            
            
            <?php
            	if(empty ($this->isSuccess)){
			?>
            
			<div class="status">
            	<div class="wrong"></div>
                <?php echo $this->translator->translator('install_step6_has_failed'); ?>
            </div>
                        
            <?php
			}
			
			else {	
			
			?>
            
            <div class="status">
            	<div class="correct"></div>
                <?php echo $this->translator->translator('install_step6_has_successful'); ?>
            </div>
            
			</p>
            
            <?php 
			}
			
			 if($this->mailError){ ?>
                <div id="errorBoxMessageDiv" class="warning">
                    <?php echo $this->translator->translator('install_step5_error_message').' : '; ?> <?php echo $this->mailError; ?>
                </div>
            <?php } ?>	
            
            
            
            <?php if($this->messageError){ ?>
                <div id="errorBoxMessageDiv" class="errors">
                    <?php echo $this->translator->translator('install_step5_error_message').' : ';
					
					 echo $this->messageError; 
					 
					 ?>			
			
                </div>
				<div></div>

            <?php 
                }
                if( ! empty( $this->isSuccess))
                {
            ?>
            
            <div class="infoMess"><?php echo sprintf($this->translator->translator('install_step6_change_password'), $this->url.'/Administrator/'); ?></div>
            
            <div class="chart-1">
            	<div class="row">
                	<div class="col-1">
                    	<div class="data-table">
                        	<table border="0" cellpadding="0" cellspacing="0" class="highlighter admin-login-info">
                            	<thead>
                               		<tr>
                                    	<th><?php echo $this->translator->translator('install_step6_admin_header'); ?></th>
                                	</tr>
                             	</thead>
                                <tbody>
                              		<tr>
                                		<td class="title"><?php echo $this->translator->translator('install_step6_admin_username'); ?> : <?php echo $this->username; ?><input type="hidden" name="username" value="<?php echo $this->username; ?>" /></td>
                              		</tr>
                  					<tr>
                    					<td class="title"><?php echo $this->translator->translator('install_step6_admin_password'); ?> : <?php echo $this->password; ?><input type="hidden" name="password" value="<?php echo $this->password; ?>" /></td>
                  					</tr>
                				</tbody>
                       		</table>
                       	</div>
                    </div>
                    
                    <div class="col-2">
                    	<div class="data-table">
                        	<table border="0" cellpadding="0" cellspacing="0" class="highlighter super-admin-login-info">
                            	<thead>
									<tr>
                                    	<th><?php echo $this->translator->translator('install_step6_admin_super_header'); ?></th>
                                  	</tr>
                            	</thead>
                                <tbody>
                                	<tr>
                                    	<td class="title"><?php echo $this->translator->translator('install_step6_admin_super_username_title'); ?> : <?php echo $this->root_username; ?></td>
                                  	</tr>
                  					<tr>
                    					<td><span class="title"><?php echo $this->translator->translator('install_step6_admin_super_password_title'); ?> : <?php echo $this->root_password; ?></span><br />
                      						<span class="info"><?php echo $this->translator->translator('install_step6_admin_super_change_password_guide'); ?></span>
                                      	</td>
                  					</tr>
                           		</tbody>
                			</table>
                        </div>
                    </div>
                </div>
            </div>

			<?php
                }
            ?>	
            
            <?php if(empty($this->messageError)){ ?>
            <div class="button-container">
                <div class="icon"><input type="button" name="gotoFrontend" id="gotoFrontend" value=" <?php echo $this->translator->translator('install_step6_go_to_frontend'); ?>" class="button-frontend" /></div>
                <div class="icon"><input type="button" name="gotoBackend" id="gotoBackend" value="<?php echo $this->translator->translator('install_step6_go_to_backtend'); ?>" class="button-backend" /></div>
            </div>
            <?php } ?>
        </fieldset>	
    </form>